home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / batchut / echsys10.zip / PUSHD.BAT < prev    next >
DOS Batch File  |  1989-09-25  |  619b  |  23 lines

  1. @Echo Off
  2. Rem  Save current drive and directory for later return by POPD
  3. Rem  (maximum nesting level: 9; may be extended)
  4. Rem  Assumes room for temporary batch file on drive C:
  5. Set temp=
  6. If "%dir9%" == "" Set temp=9
  7. If "%dir8%" == "" Set temp=8
  8. If "%dir7%" == "" Set temp=7
  9. If "%dir6%" == "" Set temp=6
  10. If "%dir5%" == "" Set temp=5
  11. If "%dir4%" == "" Set temp=4
  12. If "%dir3%" == "" Set temp=3
  13. If "%dir2%" == "" Set temp=2
  14. If "%dir1%" == "" Set temp=1
  15. If "%temp%" == "" Goto pushdstackfull
  16. envsys dsk%temp% ^:
  17. envsys dir%temp% ^\
  18. Set temp=
  19. Goto pushdend
  20. :pushdstackfull
  21. Echo Stack is full!
  22. :pushdend
  23.